<{include file="admin/header.html"}>

			<ul id="main-nav">  <!-- Accordion Menu -->

				<li>
					<a href="<{spUrl c=admin a=index}>" class="nav-top-item no-submenu">控制面板</a>
				</li>

				<li>
					<a href="#" class="nav-top-item current">文章</a>
					<ul>
						<li><a href="<{spUrl c=post a=write}>">撰写新文章</a></li>
						<li><a class="current" href="<{spUrl c=post a=index}>">文章管理</a></li>
						<li><a href="<{spUrl c=category a=index}>">分类管理</a></li>
					</ul>
				</li>

				<li>
					<a href="#" class="nav-top-item">页面和区块</a>
					<ul>
						<li><a href="<{spUrl c=page a=write}>">撰写新页面</a></li>
                        <li><a href="<{spUrl c=area a=write}>">撰写新区块</a></li>
						<li><a href="<{spUrl c=page a=index}>">页面管理</a></li>
						<li><a href="<{spUrl c=area a=index}>">区块管理</a></li>
					</ul>
				</li>

				<li>
					<a href="#" class="nav-top-item">设置</a>
					<ul>
						<li><a href="<{spUrl c=user a=edit uid=$smarty.session.userinfo.uid}>">个人信息</a></li>
						<li><a href="<{spUrl c=user a=index}>">用户和权限</a></li>
					</ul>
				</li>

			</ul> <!-- End #main-nav -->

		</div></div> <!-- End #sidebar -->

		<div id="main-content"> <!-- Main Content Section with everything -->

			<div class="content-box"><!-- Start Content Box -->

				<div class="content-box-header">

					<h3>文章列表</h3>

				</div> <!-- End .content-box-header -->

				<div class="content-box-content">
				<form id="form1" name="form1" method="get" action="<{spUrl c=post a=del}>">
				  <table>

							<thead>
								<tr>
								   <th>ID</th>
	<th>标题</th>
	<th>浏览</th>
	<th>显示</th>
	<th>推荐</th>
	<th>公开</th>
	<th>作者</th>
	<th>操作</th>
	</tr>

	</thead>

							<tfoot>
								<tr>
									<td colspan="7">

										<div class="pagination">
										<{if $pager}>
										<{if $pager.current_page != $pager.first_page}>
											<a href="<{spUrl c=post a=posts page=$pager.first_page}>">&laquo; 前页</a> |
											<a href="<{spUrl c=post a=posts page=$pager.prev_page}>">&laquo; 上一页</a> |
											<{/if}>
											<!--开始循环页码，同时如果循环到当前页则不显示链接-->
											<{foreach from=$pager.all_pages item=thepage}>
											<{if $thepage != $pager.current_page}>
											<a class="number" href="<{spUrl c=post a=posts page=$thepage}>"><{$thepage}></a>
											<{else}>
											<b class="number current"><{$thepage}></b>
											<{/if}>
											<{/foreach}>
											<!--在当前页不是最后一页的时候，显示下一页和后页-->
											<{if $pager.current_page != $pager.last_page}> |
											<a href="<{spUrl c=post a=posts page=$pager.next_page}>">下一页 &raquo;</a> |
											<a href="<{spUrl c=post a=posts page=$pager.last_page}>">后页 &raquo;</a>
											<{/if}>
											<{/if}>

										</div> <!-- End .pagination -->
										<div class="clear"></div>
									</td>
								</tr>
							</tfoot>

							<tbody>
							<{if $results == ""}>
							<tr>
								<td><center><font color="red">没有找到您要的文章！</font></center></td>
							</tr>
							<{else}>
								<{foreach from=$results item=one}>
								<tr>
									<td><{$one.id}></td>
									<td><!--循环显示分类-->
									[<{foreach from=$select item=result}>
										  <a href="<{spUrl c=post a=cate id=$result.id}>"><{if $one.parent == $result.id}><{$result.name}><{/if}></a>
									<{/foreach}>]
									<a href="<{spUrl c=post a=edit id=$one.id}>"><{$one.title}></a>
									</td>
									<td><a href="<{spUrl c=main a=article slug=$one.slug}>"><{$one.count}></a></td>
									<td><{if $one.status == "1"}><font color='red'>隐藏</font><{else}>显示<{/if}></td>
									<td><{if $one.allowCommend == "1"}><font color='red'>推荐</font><{else}>正常<{/if}></td>
									<td><{if $one.public == "1"}><font color='red'>公开</font><{else}>受限<{/if}></td>
									<td><{$one.author}></td>
									<td>
										<!-- Icons -->
										 <a href="<{spUrl c=post a=edit id=$one.id}>" title="Edit"><img src="/resources/images/icons/pencil.png" alt="Edit" /></a>
										 <a href="javascript:void(0);" onclick="delconfirm(<{$one.id}>,'<{$one.title}>');" title="Delete"><img src="/resources/images/icons/cross.png" alt="Delete" /></a>
									</td>
								</tr>
								<{/foreach}>
								<{/if}>
								<tr>

								</tr>


							</tbody>

						</table>
						</form>
				</div> <!-- End .content-box-content -->

			</div> <!-- End .content-box --><!-- End .content-box --><!-- End .content-box -->
	    <div class="clear"></div>
<{include file="admin/footer.html"}>
<script>
function delconfirm(id,title){
	if( window.confirm("确定删除“" + title + "”？") ){
		window.location = "<{spUrl c=post a=del}>&id=" + id;
	}
}
</script>